home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96a.txt
/
000190_icon-group-sender _Mon Aug 19 15:11:58 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1996-09-05
|
1KB
Received: by cheltenham.cs.arizona.edu; Tue, 20 Aug 1996 08:07:37 MST
Date: Mon, 19 Aug 1996 15:11:58 -0700
From: kwalker@orville.premenos.com (Ken Walker)
Message-Id: <199608192211.PAA11095@varda.premenos.com>
To: icon-group@cs.arizona.edu, cwfraser@microsoft.com
Subject: Re: evaluating
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Md5: b9bYLMWJUzCATydTrFLMLA==
Errors-To: icon-group-errors@cs.arizona.edu
> From: Chris Fraser <cwfraser@microsoft.com>
> Date: Mon, 19 Aug 1996 10:15:36 -0700
>
> During the evaluation of, say,
>
> every (1 to 1000000)/real(n) ...
>
> n is converted to floating point once, not one million times, right?
In general, evaluation is left to right. real(n) is evaluated after
(1 to 1000000). If n changes between iterations, the semantics of Icon
requires that real(n) be reevaluted. The optimizing compiler does not
do enough analysis to determine if the expression can be evaluated just once
in this case, so it will be evaluated one million times reguardless
of whether you use the interpreter or the compiler.
Ken Walker, kwalker@premenos.com
Premenos Coporation, Concord, Ca. 94520